Skip to content

🤖 Docker & n8n Services

To build intelligent workflow automations that handle personal and business management, you need an orchestration server that runs continuously, reacts to webhooks, and schedules tasks. n8n (self-hosted in Linux) is the ultimate node-based workflow automation engine, offering a premium, local alternative to Zapier or Make.

For associated modules, see:


🚀 Setting Up n8n in Linux

There are two primary ways to run n8n in your Linux workspace: using Node.js (NVM) directly or via Docker.

Method 1: Running via Node/NVM (Direct)

Since you have NVM configured, you can run n8n natively as a global npm package:

bash
# 1. Activate Node environment (NVM)
nvm use default

# 2. Start n8n
n8n start

Once started, open your web browser and navigate to:
🔗 http://localhost:5678

Running n8n inside a Docker container ensures that its database (SQLite or PostgreSQL) and files are fully isolated and auto-restart on boot.

Create a docker-compose.yml in your workspace folder: Path: ~/AI_BOOTCAMP/labs/n8n/docker-compose.yml

yaml
version: '3.8'
services:
  n8n:
    image: n8nio/n8n:latest
    container_name: n8n-server
    restart: always
    ports:
      - "5678:5678"
    environment:
      - N8N_HOST=localhost
      - N8N_PORT=5678
      - N8N_PROTOCOL=http
      - WEBHOOK_URL=http://localhost:5678/
    volumes:
      - ~/AI_BOOTCAMP/labs/n8n/data:/home/node/.n8n

Execute this inside your terminal:

bash
cd ~/AI_BOOTCAMP/labs/n8n
docker-compose up -d

⚡ Connecting n8n with AI Agents

The true power of n8n is its Advanced AI integrations. You can build self-hosted HTTP endpoints in n8n that act as tools for your Python-based agent workflows or LangGraph loops!

Premium Automation Templates:

  1. AI Email Auto-Responder: Triggered on new email ➡️ Send body to local LLM or OpenAI ➡️ Draft response ➡️ Send Slack notification for approval ➡️ Send Email.
  2. Autonomous Competitor Scraper: Weekly Cron trigger ➡️ Scrape competitor pricing ➡️ Store in local PostgreSQL ➡️ Generate summary report via Claude ➡️ Email markdown report to your inbox.
  3. Local Dev Bridge: Triggered on code commit ➡️ Spin up testing containers ➡️ Deploy updates inside Linux automatically.

⚙️ Docker Resource Optimization

Running multiple Docker containers inside Linux can drain system memory if unchecked. Because we leverage resource-limited runtime container settings (-m 128m or limiting memory in your Docker Compose configurations), your system RAM is kept clean and highly optimized.

To prune old containers, images, and volumes to free up disk space, run:

bash
docker system prune -a --volumes